﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:System8ToyMC" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.DesignNameList"
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	x:Class="System8ToyMC.MainPage"
	>

	<UserControl.Resources>
		<SampleData:DesignNameList x:Key="DesignNameList" d:IsDataSource="True"/>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" Background="White">
		<Grid.RowDefinitions>
			<RowDefinition Height="216"/>
			<RowDefinition/>
		</Grid.RowDefinitions>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="LoadTextVisibility">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="00:00:00.5000000">
						<VisualTransition.GeneratedEasingFunction>
							<ExponentialEase EasingMode="EaseIn"/>
						</VisualTransition.GeneratedEasingFunction>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="LoadTextInvisible">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConversionTextEntry" Storyboard.TargetProperty="(UIElement.Opacity)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConversionTextEntry" Storyboard.TargetProperty="(Control.IsEnabled)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="LoadTextVisible">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConversionTextEntry" Storyboard.TargetProperty="(UIElement.Opacity)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConversionTextEntry" Storyboard.TargetProperty="(Control.IsEnabled)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>True</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
        <ScrollViewer Margin="0,0,8,0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Grid.Row="1">
        	<local:System8Parameters x:Name="System8Params"/>
        </ScrollViewer>
		<local:SaveLoad x:Name="SaveLoad" HorizontalAlignment="Right" Margin="0,8,8,0" VerticalAlignment="Top" SavedNames="{Binding SavedResults.LocalDatasets, Mode=OneWay}"/>
		<Button HorizontalAlignment="Right" Margin="0,62,8,0" VerticalAlignment="Top" Content="Enter Text" x:Name="ConvertFromText">
			<i:Interaction.Triggers>
				<i:EventTrigger EventName="Click">
					<ic:GoToStateAction StateName="LoadTextVisible"/>
				</i:EventTrigger>
			</i:Interaction.Triggers>
		</Button>
		<local:LoadFromTextDialog x:Name="ConversionTextEntry" HorizontalAlignment="Right" Margin="0,62,49,-93" Opacity="0" IsEnabled="False" d:LayoutOverrides="Height" Canvas.ZIndex="12">
			<i:Interaction.Triggers>
				<i:EventTrigger EventName="CancelConvert">
					<ic:GoToStateAction TargetName="" StateName="LoadTextInvisible"/>
				</i:EventTrigger>
				<i:EventTrigger EventName="Convert">
					<ic:GoToStateAction StateName="LoadTextInvisible"/>
				</i:EventTrigger>
			</i:Interaction.Triggers>
		</local:LoadFromTextDialog>
		<local:HistogramArea x:Name="PlotAreaManager" Margin="0,0,212,0"/>
    </Grid>
</UserControl>